package com.yrk.util;

import com.yrk.dao.UserDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserDaoUtil {
    public  static UserDao getUserDao() {
        ApplicationContext ac = new ClassPathXmlApplicationContext("spring.xml");
        UserDao userDao = (UserDao)ac.getBean("userDao");
        return userDao;
    }
}
